//
//  TEAUtil.h
//  firebkball
//
//  Created by ren jian on 18/5/28.
//
//

#ifndef TEAUtil_h
#define TEAUtil_h

#include <stdio.h>
#include <stdint.h>

#include <string>
#include <fstream>

class TEAUtil
{
public:
    static unsigned char* encrypt(unsigned char data[],long data_len,uint32_t k[],unsigned long* pSize);
    static unsigned char* decrypt(unsigned char data[],long data_len,uint32_t k[],unsigned long* pSize);
    static unsigned char* convert2str(unsigned char* decryptData,unsigned long pSize);
private:
    static uint32_t* encrypt (uint32_t v[], uint32_t k[]);
    static uint32_t* decrypt (uint32_t v[], uint32_t k[]);
    static void transform(unsigned char* buffer);
};

#endif /* TEAUtil_h */
